package com.ch.szh.controller;

import com.ch.szh.model.R;
import com.ch.szh.service.TestService;
import com.ch.szh.util.ComUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/kb")
@CrossOrigin

public class TestController {
    @Autowired
    private TestService sysService;
    @Value("${server.port}")
    private  int port;

    @PostMapping("/getTestList")
    //测试
    public R getTestList(@RequestBody Map<String, Object> map) {
        List<Map<String, Object>> list = sysService.getTestList(map);
        return R.ok().setData(ComUtil.converToLowerCaseKey(list));
    }


}
